home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
PC World Komputer 2010 April
/
PCWorld0410.iso
/
hity wydania
/
Ubuntu 9.10 PL
/
karmelkowy-koliberek-desktop-9.10-i386-PL.iso
/
casper
/
filesystem.squashfs
/
etc
/
power
/
scripts.d
/
laptop-mode
Wrap
Text File
|
2009-10-06
|
874b
|
39 lines
#!/bin/sh
# name : laptop-mode
# author : Matthias Grimm <matthiasgrimm@users.sourceforge.net>
# description : toggle laptop mode in kernel and adjust
# memory management buffer flush timeouts
# requirements: laptop-mode support in kernel
# laptopmode.sh somewhere on your system
# limitations : none
#
# --- end of public part -- don't change below this line ---
set -e
LMODE=/usr/sbin/laptop_mode
[ -x $LMODE ] || exit 0
if [ -w /proc/sys/vm/laptop_mode ]; then
case "$1" in
powersave)
$LMODE "start"
echo "3 " $LMODE "start"
;;
custom)
$LMODE "auto"
;;
performance)
$LMODE "stop"
;;
resume)
$LMODE "auto" "force"
;;
esac
elif [ -x logger ]; then
logger -p daemon.error -t laptop-mode "Laptop-mode support missing in kernel."
fi